This tutorial demonstrates how to implement Machine
License and protect your application with floating/roaming* network licenses. Specifically, you want to distribute
your application in which you can control the number of concurrent users
(including roaming users) within a network. With the custom/secure licensing
scheme, the user must first obtain a License Key to activate the network
license before starting to use the application. Then, you can license the
application in any way you want using the provided preset implementations.
If you want to distribute your application as a trial version, the
custom/secure licensing scheme can provide a secure evaluation method. As
opposed to general evaluation, the user cannot try out the application
immediately after installation, but must first obtain an evaluation License
Key. This approach allows you to control the distribution of your trial version
that you can decide whether to grant or decline each evaluation request.
Based on the settings used in this tutorial, the following describes
how the user would experience the protected application.
·
You distribute the application with the setup
package for deploying the network license.
·
The user (or administrator) must deploy the
provided NetKey
License Server (NKLS) to a server, and then install the network license by
using the provided Register utility.
·
When starting the Register utility, the
Registration dialog box pops up showing a Registration
ID.
·
To register, the user can click the Register
button to link to your registration webpage, or send you a registration email.
In both cases, the Registration ID is automatically passed to the webpage or
the email composer.
·
Alternatively, the user may contact you by
phone, fax, etc., and provide the Registration ID.
·
With the received Registration ID, you can
generate the License Key to be returned to the
user that grants a 30-day evaluation, turns the trial into full version, etc.
·
During registration, you may collect the user
information and charge the user a license fee.
·
When the user enters the License Key in the
Registration dialog box, the network license is licensed as specified in the
License Key.
·
When the NKLS is up and running, it is ready to allocate available licenses to the
application running on the client computers.
·
The user can install and run the application
on the client computers. On each client computer, no individual registration is
needed, and it must be ensured to have the Network Key configuration file
(NETKEY.INI) with the proper settings of the NKLS address and port number.
·
Optionally, the user can check out (or
borrow) a network license from the server using the provided Roam utility. This
allows the roaming user to disconnect from the network, and temporarily use the
application off-site (e.g. for 15 days).
*
The roaming license feature is included in ElecKey
Ultimate edition and available by feature upgrade for other editions.
The following instructions use ElecKey Integrator (the shell
protection method) to protect the application. The necessary settings are
described below. However, you may change the options as you want.
Besides the shell protection method, you may also use the provided KeyCheck API (including
the KeyCheck Class Library and the KeyCheck .NET Component) to protect your application, by
specifying the same settings as described below. Please see Protecting Applications
Using API and the provided code examples
for more information.
In addition to protecting the application, you must also use ElecKey Integrator to create the Network Key Register
utility (REGISTER.EXE), which allows the user to install and activate the
network license on the server. This Register utility must be distributed with NetKey License Server.
Optionally, if roaming licenses are deployed, you must also use LicenseKey Manager to create the Roam utility (ROAM.EXE),
which allows the user to check out (or borrow) a network license from the
server. The Roam utility must be distributed with NetKey
License Server.
1.
Run ElecKey Integrator.
The wizard dialog box appears.
2.
In the Select Application License Type
dialog, select Machine License.
3.
In the Select Integration Task dialog,
select Protect Code and Enforce Licensing.
4.
In the Specify Protected Program
dialog, specify your executable file name in the Original field. In the Target
field, specify a different name for the protected executable file that will be
created.
5.
In the Set Identification dialog,
assign a Program ID in the Program ID field.
6.
In the Key Detection Method dialog, select
Detect Network Key.
7.
In the Set Options dialog, you can use
the default settings.
8.
In the Customize Messages dialog, the
needed dialog boxes for the implementation you have chosen are automatically
checked. However, you can enable the dialog boxes as well as edit messages and
options as you want.
9.
In the Summary dialog, review the
action you have chosen.
10. Click
the Integrate button. The protected version of your executable file is
created.
It is recommended that you save your unprotected executable file in a
safe place. You can then rename the protected version to its original file
name, and use it further to create a setup package and distribute your
application to the user.
1.
Run ElecKey
Integrator. The wizard dialog box appears.
2.
In the Select Application License Type
dialog, select Machine License.
3.
In the Select Integration Task dialog,
select Build End-User Utilities for Network Key.
4.
In the Set Identification dialog, assign
the same Program ID (you previously used to protect your application) in the Program
ID field.
5.
In the Set Options dialog, you can use
the default settings.
6.
In the Select Evaluation Mode dialog,
select Custom/Secure Evaluation.
7.
In the Customize Messages dialog, the
needed dialog boxes for the implementation you have chosen are automatically
checked. However, you can enable the dialog boxes as well as edit messages and
options as you want. Then, click the Edit button of the Registration Dialog
Box checkbox.
8.
In the Registration Dialog Box Properties
dialog box, click the Options tab. Then, in the URL/Email/Document/Executable
field, enter your website URL. For instance, https://www.sciensoft.com/register.html
or https://www.sciensoft.com/register.htm?regid=<EncRegID>. Or, enter
the email composer parameters. For instance, mailto:service@sciensoft.com or
mailto:service@sciensoft.com?subject=Request License Key&body=My
Registration ID is <RegID>.
9.
In the Create End-User Utilities
dialog, the needed end-user utilities for the implementation you have chosen
are automatically checked. However, you can choose to build the end-user
utilities as you want.
10. In
the Summary dialog, review the action you have chosen.
11. Click
the Integrate button. The end-user utilities for Network Key are
created.
1.
Run LicenseKey
Manager.
2.
From the Tools
menu, select Create Roam Utility.
The dialog box appears.
3.
In the Exec File
edit box, enter the full path to create the Roam utility.
4.
In the Program ID drop-down
list, select the Program ID you previously used to protect your application.
5.
In the Default Dialog
Box pane, you can customize the texts and labels for
the Roam utility.
6.
Click the Create
button. The Roam utility and configuration file (.INI) are created in the
specified path.
To distribute the network licensed application, you may create two
setup packages. One is the setup for installing the application on the client
computers. The other is the setup for deploying NetKey
License Server (NKLS) and the network license on the server.
To create a setup package for the application, please ensure to include
the protected version of your executable file and the ElecKey
system files. For Win32/Win64/.NET applications, the following is the list of
the needed system files:
·
Ekc3220.dll
(in \Deploy\Win32App\KeyCheck\)
·
Ekc6420.dll
(in \Deploy\Win64App\KeyCheck\)
·
Nkag20.exe
(in \Deploy\Win32App\Network\)
·
Nkag6420.exe
(in \Deploy\Win64App\Network\)
·
Netkey.ini
(Network Key configuration file)
The above system files must be placed in the same directory as the
protected executable file. Note that the user must edit the Network Key
configuration file (NETKEY.INI) with the proper settings of the NKLS address
and port number. Depending on the features you have enabled, you may need
additional system files. Please see Network
License System Files for more details.
To create a setup package for deploying the network license, please
ensure to include the provided NetKey License Server
(NKLS) setup installer:
·
NKLS Setup.exe
(in \NetKeyLicenseServer\)
·
NKLS 4.0 EK.msi
(optional) (in \NetKeyLicenseServer\)
You may also repack all files in the NKLS setup installer and create
your own setup package.
In addition, create the network license setup that includes the
following files:
·
Register.exe
(Network Key Register utility)
·
Ekc3220.dll
(in \Deploy\Win32App\KeyCheck\)
·
Ekc6420.dll
(in \Deploy\Win64App\KeyCheck\)
·
Nkag20.exe
(in \Deploy\Win32App\Network\)
·
Nkag6420.exe
(in \Deploy\Win64App\Network\)
·
Netkey.ini (Network
Key configuration file)
·
End-user utilities
(optional)
·
Roam utility
(optional)
The user can install the network license by running the Network Key
Register utility (REGISTER.EXE) locally on the server, or remotely from a
client computer. In both cases, the Network Key configuration file (NETKEY.INI)
must be edited with the proper settings of the NKLS address and port number.
By implementing Machine License, you can license the protected
application by generating the License Key to be returned to the user. For
floating network licensing, you can set the maximum number of allowed
concurrent users to be encoded in the License Key. The following instructions
describe how to use LicenseKey
Manager to generate a License Key.
1.
Run LicenseKey
Manager.
2.
In the Main tab of the Key
Properties pane, enter the Registration ID received from the user in the Registration
ID field. Then, click the Check button.
3.
The Identification field shows the Key
ID, Program ID, and flag decoded from the Registration ID. The flag N
means the Registration ID is generated from the Network Key.
4.
From the Implementation drop-down
list:
·
Select Custom if you want to customize
the licensing properties to generate the License Key.
·
Select Evaluation if you want to
generate the evaluation License Key. You can then specify the Expired Date,
Max-Day, and Max-Exec as you want.
·
Select Distribution
if you want to generate the License Key for full distribution with no limit.
5.
Click the Network
tab. In the Network Key
box, specify the maximum number of concurrent users in the Max-User field, and then specify the network settings
as you want. If you want to allow roaming licenses, specify the roaming period
in the Max-Roam field.
6.
From the Note pane, you can enter
notes about registration such as the user’s name, address, telephone, etc. in
the Messages field.
7.
From the Email pane, you can enter the
user’s email address in the Email Address field.
8.
Click the Key Properties pane. Then,
click the Generate button. The License Key is shown in the License
Key field. All registration information (including Registration ID, License
Key, date, etc.) are automatically recorded in the Registration List
pane.
9.
To send the License Key via email, click the Email
pane. Then, click the Send button. LicenseKey
Manager automatically launches your default email composer with both email
address and License Key filled in.